Integrand size = 23, antiderivative size = 214 \[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=-\frac {(3 a+b (7+2 p)) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b^2 f (3+2 p) (5+2 p)}-\frac {\cos ^2(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b f (5+2 p)}+\frac {\left (3 a^2+2 a b (5+2 p)+b^2 \left (15+16 p+4 p^2\right )\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \sin ^2(e+f x)}{a}\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{b^2 f (3+2 p) (5+2 p)} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3269, 427, 396, 252, 251} \[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\frac {\left (3 a^2+2 a b (2 p+5)+b^2 \left (4 p^2+16 p+15\right )\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (\frac {b \sin ^2(e+f x)}{a}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \sin ^2(e+f x)}{a}\right )}{b^2 f (2 p+3) (2 p+5)}-\frac {(3 a+b (2 p+7)) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{p+1}}{b^2 f (2 p+3) (2 p+5)}-\frac {\sin (e+f x) \cos ^2(e+f x) \left (a+b \sin ^2(e+f x)\right )^{p+1}}{b f (2 p+5)} \]
[In]
[Out]
Rule 251
Rule 252
Rule 396
Rule 427
Rule 3269
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (1-x^2\right )^2 \left (a+b x^2\right )^p \, dx,x,\sin (e+f x)\right )}{f} \\ & = -\frac {\cos ^2(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b f (5+2 p)}+\frac {\text {Subst}\left (\int \left (a+b x^2\right )^p \left (a+b (5+2 p)-(3 a+b (7+2 p)) x^2\right ) \, dx,x,\sin (e+f x)\right )}{b f (5+2 p)} \\ & = -\frac {(3 a+b (7+2 p)) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b^2 f (3+2 p) (5+2 p)}-\frac {\cos ^2(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b f (5+2 p)}+\frac {\left (3 a^2+2 a b (5+2 p)+b^2 \left (15+16 p+4 p^2\right )\right ) \text {Subst}\left (\int \left (a+b x^2\right )^p \, dx,x,\sin (e+f x)\right )}{b^2 f (3+2 p) (5+2 p)} \\ & = -\frac {(3 a+b (7+2 p)) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b^2 f (3+2 p) (5+2 p)}-\frac {\cos ^2(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b f (5+2 p)}+\frac {\left (\left (3 a^2+2 a b (5+2 p)+b^2 \left (15+16 p+4 p^2\right )\right ) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}\right ) \text {Subst}\left (\int \left (1+\frac {b x^2}{a}\right )^p \, dx,x,\sin (e+f x)\right )}{b^2 f (3+2 p) (5+2 p)} \\ & = -\frac {(3 a+b (7+2 p)) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b^2 f (3+2 p) (5+2 p)}-\frac {\cos ^2(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^{1+p}}{b f (5+2 p)}+\frac {\left (3 a^2+2 a b (5+2 p)+b^2 \left (15+16 p+4 p^2\right )\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \sin ^2(e+f x)}{a}\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{b^2 f (3+2 p) (5+2 p)} \\ \end{align*}
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 0.44 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.89 \[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\frac {3 a \operatorname {AppellF1}\left (\frac {1}{2},-2,-p,\frac {3}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right ) \cos ^4(e+f x) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p}{f \left (3 a \operatorname {AppellF1}\left (\frac {1}{2},-2,-p,\frac {3}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},-2,1-p,\frac {5}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right )-2 a \operatorname {AppellF1}\left (\frac {3}{2},-1,-p,\frac {5}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right )\right ) \sin ^2(e+f x)\right )} \]
[In]
[Out]
\[\int \left (\cos ^{5}\left (f x +e \right )\right ) {\left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )}^{p}d x\]
[In]
[Out]
\[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5} \,d x } \]
[In]
[Out]
\[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int {\cos \left (e+f\,x\right )}^5\,{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^p \,d x \]
[In]
[Out]